﻿@model qltscd.Models.BaseClient.PhieuBaoHanh

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/Modules/_LayoutTacVuNhapLieu.cshtml";
}


<h2>Bảo Hành</h2>


@using (Html.BeginForm("Index", "PhieuBaoHanh", FormMethod.Post, new { @id = "TaoPhieuBaoHanh" }))
{ 
    @Html.ValidationSummary(true)
    
    <fieldset>
        <table style="width: 100%">
            <tr>
                <td class="label_col">
                    Mã Phiếu Bảo Hành
                </td>
                <td >
                    @Html.TextBoxFor(Model => Model.MaPhieuBaoHanh, new { @style = "width:97%; " })
                    
                </td>
                <td class="label_col">
                    Serial Thiết Bị
                </td>
                <td >
                    @(
                    Html.Telerik().ComboBox().Name("IdentityThietBi")
                    .HtmlAttributes(new { @style = "width:97%;" })
                    .InputHtmlAttributes(new { @style = "width:100%; " })
                    .BindTo((SelectList)ViewBag.SerialThietBiBaoHanh)
       
                    )

                    
                </td>
            </tr>
            <tr>
                <td class="label_col">
                    Người Giao
                </td>
                <td  class="label_col">
                    @(
                    Html.Telerik().ComboBox().Name("NguoiGiao")
                    .HtmlAttributes(new { @style = "width:97%;" })
                    .InputHtmlAttributes(new { @style = "width:100%; " })
                    .BindTo((SelectList)ViewBag.NguoiGiao)
                    )
                    
                </td>
                <td class="label_col">
                    Ngày Giao
                </td>
                <td class="label_col">
                    @Html.Telerik().DatePicker().Name("NgayGiao").HtmlAttributes(new { @style = "width:70%; " }) 
                    
                      
                </td>
            </tr>
            <tr>
                <td class="label_col">
                    Người Nhận
                </td>
                <td >
                    @Html.TextBoxFor(Model => Model.NguoiNhan, new { @style = "width:97%; " })
                    
                </td>
                <td class="label_col">
                    Đơn Vị Bảo Hành
                </td>
                <td  class="label_col">
                    @(
 Html.Telerik().ComboBox().Name("DonViBaoHanh")
                    .HtmlAttributes(new { @style = "width:97%;" })
                    .InputHtmlAttributes(new { @style = "width:100%; " })
                    .BindTo((SelectList)ViewBag.DonViBaoHanh)
                    )
                    
                </td>
            </tr>
            <tr>
                <td class="label_col">
                    Ngày Trả
                </td>
                <td class="label_col">
                    @Html.Telerik().DatePicker().Name("NgayTra").HtmlAttributes(new { @style = "width:70%; " }) 
                                
                </td>

                <td class="label_col">
                    Nội Dung Bảo Hành
                </td>
                <td >
                    @Html.TextBoxFor(Model => Model.NoiDungBaoHanh, new { @style = "width:97%; " })
                    
                </td>
            </tr>
            @*<tr>
                <td class="label_col">
                    Thay Thế
                </td>
                <td  class="label_col">
                    @(
 Html.Telerik().ComboBox().Name("ThayThe")
                    .HtmlAttributes(new { @style = "width:97%;" })
                    .InputHtmlAttributes(new { @style = "width:100%; " })
        //.BindTo((SelectList)ViewBag.NguoiGiao)
                    )
                    @Html.ValidationMessageFor(model => model.IdentityThayThe)
                </td>
            </tr>*@
        </table>
           <div class="divButton">
                <input type="submit" value="Lưu" class="button" />&nbsp;
                <input type="reset" value="Nhập lại" class="button" />&nbsp;
            @Html.ActionLink("Thoát", "Index", "TacVu", null, new { @class = "button" })
        </div>
        <div class="errBlock">
            @ViewData["errMaPhieuBaoHanh"]<br />
            @Html.ValidationMessageFor(model => model.MaPhieuBaoHanh, "", new { @style = "display:block;" })
            @Html.ValidationMessageFor(model => model.IdentityThietBi, "", new { @style = "display:block;" })
            @Html.ValidationMessageFor(model => model.NguoiGiao, "", new { @style = "display:block;" })
            @Html.ValidationMessageFor(model => model.NgayGiao, "", new { @style = "display:block;" })
            @Html.ValidationMessageFor(model => model.NguoiNhan, "", new { @style = "display:block;" })
            @Html.ValidationMessageFor(model => model.DonViBaoHanh, "", new { @style = "display:block;" })
            @Html.ValidationMessageFor(model => model.NgayTra, "", new { @style = "display:block;" })   
            @Html.ValidationMessageFor(model => model.NoiDungBaoHanh, "", new { @style = "display:block;" })
        </div>
    </fieldset>

}